<?php
/**
 * Theme file - ask confirmation after open_id authentication before creating the user account.
 *
 * @package Extensions
 * @version @@VERSION@@
 * @subpackage @@EXTENSIONNAME@@
 * @copyright Damien Lebrun 2007
 * @author Damien Lebrun
 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GPLv2
 */

$TermsOfServiceUrl = $this->Context->Configuration['WEB_ROOT'] . 'termsofservice.php';

?>
	<div class="About">
		<?php echo $this->Context->GetDefinition('AboutMembership'); ?>
		<p><a href="<?php echo GetUrl($this->Context->Configuration, $this->Context->SelfUrl); ?>"><?php echo $this->Context->GetDefinition('BackToSignInForm'); ?></a></p>
	</div>
	<div id="Form" class="ApplyForm">
		<fieldset>
			<legend><?php echo $this->Context->GetDefinition('Confirme your details'); ?></legend>
			<p><?php
				printf(
					$this->Context->GetDefinition(
						'You have successfully verified <a href="%s">%s</a> as your identity.'),
					$this->Applicant->OpenIdUrls[0],
					$this->Applicant->OpenIdUrls[0]);
				?></p>
			<p><?php echo $this->Context->GetDefinition('AllFieldsRequired'); ?></p>
			<?php
			$this->CallDelegate('PreWarningsRender');
			$this->Render_Warnings();
			$this->Render_PostBackForm($this->FormName);
			?>

				<ul>
					<?php $this->CallDelegate('PreInputsRender'); ?>
					<li>
						<label for="txtEmail"><?php echo $this->Context->GetDefinition('EmailAddress'); ?></label>
						<input id="txtEmail" type="text" name="Email" value="<?php echo $this->Applicant->Email; ?>" class="Input" maxlength="160" />
					</li>
					<li>
						<label for="txtUsername"><?php echo $this->Context->GetDefinition('Username'); ?></label>
						<input id="txtUsername" type="text" name="Name" value="<?php echo $this->Applicant->Name; ?>" class="Input" maxlength="20" />
					</li>
					<?php
					$this->CallDelegate('PostInputsRender');
					?>
					<?php
					$this->CallDelegate('PreTermsCheckRender');
					?><li id="TermsOfServiceCheckBox">
						<?php echo GetBasicCheckBox('AgreeToTerms', 1, $this->Applicant->AgreeToTerms,' id="AgreeToTerms"'); ?>

						<label for="AgreeToTerms" style="display: inline; float: none; width: auto;"><?php
						echo str_replace(
							'//1',
							' <a href="' . $TermsOfServiceUrl . '" '
								. 'onclick="PopTermsOfService(\'' . $TermsOfServiceUrl . '\'); return false;">'
								. $this->Context->GetDefinition('TermsOfService') . '</a>',
							$this->Context->GetDefinition('IHaveReadAndAgreeTo')
						);
						?></label>
					</li>
				</ul>
				<div class="Submit">
					<input type="submit" name="btnApply" value="<?php echo $this->Context->GetDefinition('Proceed'); ?>" class="Button" />
				</div>
			</form>
		</fieldset>
	</div>